Skip to content

Dynamic facilitator border and inactive button graying#1267

Merged
maebeale merged 6 commits intomainfrom
maebeale/affiliation-status-ui
Mar 8, 2026
Merged

Dynamic facilitator border and inactive button graying#1267
maebeale merged 6 commits intomainfrom
maebeale/affiliation-status-ui

Conversation

@maebeale
Copy link
Collaborator

@maebeale maebeale commented Feb 28, 2026

What is the goal of this PR and why is this important?

  • The fuchsia left border on affiliation rows was static (only updated on save/reload). Now it updates dynamically as the user types in the title field.
  • Profile buttons (person/org) inside affiliation rows didn't reflect inactive state visually. Now they gray out when the row becomes inactive (end_date in past).
  • Narrowed the title field and renamed "Primary" label to "Primary contact" for clarity.
  • Added CLAUDE.md conventions for Stimulus development: use targets/data attributes instead of DOM queries, and use shorthand action descriptors (omit default events).

How did you approach the change?

  • Extended inactive_toggle_controller.js with Stimulus targets (endDate, title, row, button) and an updateBorder() action
  • Uses explicit class lists (sky/emerald) instead of regex to swap themed button classes to gray on inactive
  • Original button classes are saved on connect() and restored when the row returns to active
  • Uses Stimulus shorthand action descriptors — controller#action instead of input->controller#action on textarea elements
  • Wired title input via data-inactive-toggle-target="title" and shorthand actions in both person and org affiliation field partials

UI Testing Checklist

  • On person edit form, type "Facilitator" in an affiliation title — fuchsia bar appears
  • Clear "Facilitator" from title — bar goes gray
  • Set end_date to past — row grays out including the org/person button
  • Clear end_date — row and button return to normal colors
  • "Primary contact" label displays on affiliation rows
  • Title field is narrower than before

Anything else to add?

  • Also documents Stimulus conventions in CLAUDE.md: use targets over querySelector, use shorthand action descriptors

🤖 Generated with Claude Code

@maebeale maebeale changed the title Dynamic facilitator border and inactive button graying HOLD: Dynamic facilitator border and inactive button graying Feb 28, 2026
@maebeale maebeale force-pushed the maebeale/affiliation-status-ui branch from eb7a1bc to 91ede92 Compare March 1, 2026 21:39
maebeale and others added 2 commits March 8, 2026 06:50
… rows

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…on rows

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@maebeale maebeale force-pushed the maebeale/affiliation-status-ui branch from 91ede92 to df9a39d Compare March 8, 2026 10:55
@maebeale maebeale changed the title HOLD: Dynamic facilitator border and inactive button graying Dynamic facilitator border and inactive button graying Mar 8, 2026
maebeale and others added 4 commits March 8, 2026 07:10
…f DOM queries

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@maebeale maebeale merged commit 50cd00e into main Mar 8, 2026
3 checks passed
@maebeale maebeale deleted the maebeale/affiliation-status-ui branch March 8, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant